﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class Theme_3_ajaxAddComment : System.Web.UI.Page
{
    PowerCreator.LMS.Web.Comment.Comment commentManager = new PowerCreator.LMS.Web.Comment.Comment();

    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            string commentid = Request.QueryString["commentid"].ToString();
            AddCommentState(int.Parse(commentid));
            Response.Write(commentid);
            Response.End();
        }
    }
    private string AddCommentState(int commentid)
    {
        string msg = "";
        PowerCreator.LMS.Web.Comment.StortCommentInfo scinfo = new PowerCreator.LMS.Web.Comment.StortCommentInfo();
        scinfo.CommentID = commentid;
        scinfo.ClickIP = PowerCreator.LMS.Common.Utils.IPUtils.GetIP;
        commentManager.AddCommentState(scinfo);
        return msg;
    }
}